
#ifndef ChangeDetectionAGENTWORLDMODEL_H
#define ChangeDetectionAGENTWORLDMODEL_H

#include "RoboroboMain/common.h"
#include "RoboroboMain/roborobo.h"

#include "WorldModels/RobotAgentWorldModel.h"

#include "Organism.h"

//#include "../include/ContextManager.h" THIS IS THE OLD INCLUDE, WHEN CMANAGER WAS IN THE PROJECT FOLDER
#include "Contexts/ContextManager.h"

class World;
class Organism;

class ChangeDetectionAgentWorldModel : public RobotAgentWorldModel {
public:
	// refer to super class to check what data / methods are available.

	ChangeDetectionAgentWorldModel();
	virtual ~ChangeDetectionAgentWorldModel();
	
	unsigned int swarmTime;
	unsigned int organismTime;
	int penalty;
	bool ditchCheck;
    double xStart;
    bool wrapAround; //set to true if agent wraps around
    int currentCluster;
    static int PIXELS_FROM_EDGE_RESET; //if an agent gets close to the edge (east) it needs to be reset
    int wrapCount;

    //values below are used to adapt log file names
    double historySize;
    double statisticalProb;
    int sensorCount;
    int clusterCount;

    bool fitnessWrapAround;
    double xCoordinateBeforeWrap;
    double distanceTraveled;
    double distanceTraveledLastIteration;

    Point2d previousPos;

    Genetics::ContextManager<double,3> CManager; //change to 19 when using getSensorValues(), or other value when using a different number of sensors
    //Genetics::ContextManager<double,6> CManager;

    void setWrapAround(bool newValue);
};


#endif


